package com.xauto.pioneer.appuser.model;

import org.json.JSONObject;

/**
 * 会员保证金缴纳信息
 * Created by Lemon on 22/04/2017.
 */
public class MemberDeposit extends BaseModel<MemberDeposit> {

    /** 保证金缴纳状态(1-已缴纳/0-未缴纳)*/
    public String is_deposit;
    /** 现有保证金金额*/
    public String deposit_amount;
    /** 现有保证金金额(格式化)*/
    public String deposit_amount_format;
    /** 需要缴纳保证金状态(1-是/0-否)  //看这个状态决定是否可以点击押金充值按钮 */
    public String is_need_deposit;
    /** 需要缴纳金额*/
    public String required_deposit_amount;
    /** 需要缴纳金额(格式化)*/
    public String required_deposit_amount_format;
    /** 需要缴纳金额说明*/
    public String required_deposit_amount_remark;
    /** 1-红色字体/0-黑色字体*/
    public String required_deposit_amount_remark_style;

    @Override
    public MemberDeposit parse(JSONObject jsonObject) {
        if(jsonObject != null) {
            is_deposit = jsonObject.optString("is_deposit");
            deposit_amount = jsonObject.optString("deposit_amount");
            deposit_amount_format = jsonObject.optString("deposit_amount_format");
            is_need_deposit = jsonObject.optString("is_need_deposit");
            required_deposit_amount = jsonObject.optString("required_deposit_amount");
            required_deposit_amount_format = jsonObject.optString("required_deposit_amount_format");
            required_deposit_amount_remark = jsonObject.optString("required_deposit_amount_remark");
            required_deposit_amount_remark_style = jsonObject.optString("required_deposit_amount_remark_style");
            return this;
        }
        return null;
    }
}
